package edu.ubb.scp.model;

import java.lang.reflect.Field;

public class ProductBrand implements Model {
	private int ProductBrandID;
	private String ProductBrandName;

	public ProductBrand(String productBrandName) {
		super();
		ProductBrandName = productBrandName;
	}

	public ProductBrand() {

	}

	public int getProductBrandID() {
		return ProductBrandID;
	}

	public void setProductBrandID(int productBrandID) {
		ProductBrandID = productBrandID;
	}

	public String getProductBrandName() {
		return ProductBrandName;
	}

	public void setProductBrandName(String productBrandName) {
		ProductBrandName = productBrandName;
	}

	@Override
	public String toString() {
		return "ProductBrand [ProductBrandID=" + ProductBrandID
				+ ", ProductBrandName=" + ProductBrandName + "]";
	}
	
	@Override
	public Field getPrimaryKey() {
		try {
			return ProductBrand.class.getDeclaredField("ProductBrandID");
		} catch (NoSuchFieldException e) {
			e.printStackTrace();
		} catch (SecurityException e) {
			e.printStackTrace();
		}
		return null;
	}
	
	@Override
	public Field[] getKeys() {
		return new Field[] { getPrimaryKey() };
	}

}
